#coding=utf-8
import httplib
import json

from Core import MongoDB

print("Crawler Prototype")
url = "http://datainterface.eastmoney.com//EM_DataCenter/js.aspx?type=SR&sty=GGSR&js=var%20TgAMtvhm={%22data%22:[(x)],%22pages%22:%22(pc)%22,%22update%22:%22(ud)%22,%22count%22:%22(count)%22}&ps=50&p=2&mkt=0&stat=0&cmd=2&code=&rt=49112746"

urls = url.split("p=")
params = urls[1].split("&")

database = MongoDB.MongoDB("192.168.1.90", "27017")
reports = database.findWithFilter("Text","ResearchReport",{})
for report in reports:
    print(report["Title"] + " " + report["DateTime"])

kkwood = 1

text = 'var TgAMtvhm={"data":[{"author":"刘疆","change":"维持","companyCode":"80198546","datetime":"2016-03-10T13:18:15","infoCode":"APPH2yNiK9wuASearchReport","insCode":"10001081","insName":"长江证券","insStar":"4","jlrs":["638500000","847900000","","",""],"rate":"买入","secuFullCode":"300418.SZ","secuName":"昆仑万维","sratingName":"买入","sy":"0.3700","syls":["49.87","37.56","","",""],"sys":["0.566","0.752","","",""],"title":"连续布局VR和人工智能再拓版图，生态整合+海外延伸驱动成长进阶","profitYear":"2015","type":"1","newPrice":"26.62"},{"author":"李凡,焦俊","change":"首次","companyCode":"10000348","datetime":"2016-03-10T13:19:15","infoCode":"APPH2yNiK9f9ASearchReport","insCode":"80066522","insName":"中投证券","insStar":"4","jlrs":["820000000","1577000000","","",""],"rate":"增持","secuFullCode":"600515.SH","secuName":"海航基础","sratingName":"推荐","sy":"0.1512","syls":["58.14","30.24","","",""],"sys":["0.21","0.41","","",""],"title":"注入海南地产资源，打造地产基建综合运营商","profitYear":"2015","type":"1","newPrice":"13.12"},{"author":"邬博华,张垚,马军","change":"维持","companyCode":"80115806","datetime":"2016-03-10T13:19:15","infoCode":"APPH2yNiK9xMASearchReport","insCode":"10001081","insName":"长江证券","insStar":"4","jlrs":["125000000","214700000","315700000","",""],"rate":"买入","secuFullCode":"002256.SZ","secuName":"彩虹精化","sratingName":"买入","sy":"0.1600","syls":["34","20","13.48","",""],"sys":["0.4","0.68","1","",""],"title":"传统主业平稳增长，静待电站规模扩张","profitYear":"2015","type":"1","newPrice":"29.42"},{"author":"徐问","change":"维持","companyCode":"10000615","datetime":"2016-03-10T13:24:24","infoCode":"APPH2yNiK9xmASearchReport","insCode":"80000037","insName":"平安证券","insStar":"4","jlrs":["150000000","194000000","","",""],"rate":"增持","secuFullCode":"000026.SZ","secuName":"飞亚达A","sratingName":"推荐","sy":"0.3100","syls":["36","28","","",""],"sys":["0.34","0.44","","",""],"title":"业绩低于预期，看好门店轻资产化扩张和智能手表推广","profitYear":"2015","type":"1","newPrice":"13.13"},{"author":"王书伟,邹润芳","change":"维持","companyCode":"80192711","datetime":"2016-03-10T13:25:22","infoCode":"APPH2yNiK9xjASearchReport","insCode":"80084302","insName":"安信证券","insStar":"4","jlrs":["190900000","249700000","","",""],"rate":"买入","secuFullCode":"300358.SZ","secuName":"楚天科技","sratingName":"买入","sy":"0.6200","syls":["37.6","28.7","","",""],"sys":["0.69","0.9","","",""],"title":"获国开发展基金增资，加快医药机器人产业化","profitYear":"2015","type":"1","newPrice":"21.21"},{"author":"王莉","change":"","companyCode":"10000638","datetime":"2016-03-10T13:27:55","infoCode":"APPH2yNiK9xyASearchReport","insCode":"80000135","insName":"银河证券","insStar":"5","jlrs":["729000000","1061000000","1516000000","",""],"rate":"买入","secuFullCode":"000050.SZ","secuName":"深天马A","sratingName":"推荐","sy":"0.4901","syls":["34","23","16","",""],"sys":["0.52","0.76","1.08","",""],"title":"LTPS+AMOLED+3D，引领未来显示","profitYear":"2015","type":"1","newPrice":"19.26"},{"author":"邹润芳,王书伟","change":"调高","companyCode":"80082000","datetime":"2016-03-10T13:29:24","infoCode":"APPH2yNiKA99ASearchReport","insCode":"80084302","insName":"安信证券","insStar":"4","jlrs":["635200000","829700000","1078400000","",""],"rate":"买入","secuFullCode":"300024.SZ","secuName":"机器人","sratingName":"买入","sy":"0.6000","syls":["55.4","42.4","32.6","",""],"sys":["0.9","1.17","1.52","",""],"title":"业绩略低预期，转折之年，工业4.0龙头加速成长","profitYear":"2015","type":"1","newPrice":"24.14"},{"author":"陈显帆,周尔双","change":"维持","companyCode":"10001283","datetime":"2016-03-10T13:29:26","infoCode":"APPH2yNiK9gLASearchReport","insCode":"80000031","insName":"东吴证券","insStar":"3","jlrs":["1496600000","2248700000","","",""],"rate":"增持","secuFullCode":"600031.SH","secuName":"三一重工","sratingName":"增持","sy":"0.0180","syls":["27","18","","",""],"sys":["0.2","0.3","","",""],"title":"拟推8亿元员工持股计划，最多2800名员工参与","profitYear":"2015","type":"1","newPrice":"5.56"},{"author":"蔡雯娟","change":"调高","companyCode":"10000690","datetime":"2016-03-10T13:33:30","infoCode":"APPH2yNiKA9AASearchReport","insCode":"80084302","insName":"安信证券","insStar":"4","jlrs":["1099600000","1314500000","1561400000","",""],"rate":"买入","secuFullCode":"000418.SZ","secuName":"小天鹅A","sratingName":"买入","sy":"1.4500","syls":["16.1","","","",""],"sys":["1.74","2.08","2.47","",""],"title":"扣非归母净利润增速超6成，稳健白马姿态尽显","profitYear":"2015","type":"1","newPrice":"34.95"},{"author":"刘疆","change":"维持","companyCode":"80149683","datetime":"2016-03-10T13:33:30","infoCode":"APPH2yNiKAabASearchReport","insCode":"10001081","insName":"长江证券","insStar":"4","jlrs":["706000000","932300000","","",""],"rate":"买入","secuFullCode":"300133.SZ","secuName":"华策影视","sratingName":"买入","sy":"0.4800","syls":["35.25","26.69","","",""],"sys":["0.65","0.86","","",""],"title":"增资兰亭数字涉足VR，《太阳的后裔》热播彰显海外布局价值，静待SIP战略爆发","profitYear":"2015","type":"1","newPrice":"14.41"},{"author":"徐春","change":"维持","companyCode":"10000690","datetime":"2016-03-10T13:36:03","infoCode":"APPH2yNiKAafASearchReport","insCode":"10001081","insName":"长江证券","insStar":"4","jlrs":["1106700000","1292300000","1584600000","",""],"rate":"买入","secuFullCode":"000418.SZ","secuName":"小天鹅A","sratingName":"买入","sy":"1.4500","syls":["13.68","11.71","9.55","",""],"sys":["1.75","2.04","2.51","",""],"title":"经营持续抢眼，现金牛价值股典范","profitYear":"2015","type":"1","newPrice":"34.95"},{"author":"朱纯阳,张晨,彭全刚,韩佳蕊","change":"维持","companyCode":"80194236","datetime":"2016-03-10T13:47:48","infoCode":"APPH2yNiKAhhASearchReport","insCode":"80000012","insName":"招商证券","insStar":"5","jlrs":["352000000","462000000","616000000","",""],"rate":"增持","secuFullCode":"002658.SZ","secuName":"雪迪龙","sratingName":"审慎推荐","sy":"0.4300","syls":["29","22.1","16.5","",""],"sys":["0.58","0.76","1.02","",""],"title":"2015年报点评：业绩稳健增长，启动第二期员工持股计划","profitYear":"2015","type":"1","newPrice":"17.61"},{"author":"刘荣,刘旭","change":"维持","companyCode":"80082000","datetime":"2016-03-10T14:03:35","infoCode":"APPH2yNiKAwKASearchReport","insCode":"80000012","insName":"招商证券","insStar":"5","jlrs":["473000000","571000000","692000000","",""],"rate":"买入","secuFullCode":"300024.SZ","secuName":"机器人","sratingName":"强烈推荐","sy":"0.6000","syls":["74","61.6","50.9","",""],"sys":["0.67","0.81","0.98","",""],"title":"2015仍处研发投入期 牵手巨头布局工业4.0","profitYear":"2015","type":"1","newPrice":"24.14"},{"author":"黄海方","change":"首次","companyCode":"80165581","datetime":"2016-03-10T14:05:07","infoCode":"APPH2yNiKAstASearchReport","insCode":"80000031","insName":"东吴证券","insStar":"3","jlrs":["263900000","367000000","550000000","",""],"rate":"增持","secuFullCode":"002541.SZ","secuName":"鸿路钢构","sratingName":"增持","sy":"0.6600","syls":["21","15","10","",""],"sys":["0.74","1.03","1.54","",""],"title":"依托绿色建筑发展需求，钢结构行业迎来拐点","profitYear":"2015","type":"1","newPrice":"18.67"},{"author":"马宝德","change":"首次","companyCode":"80013381","datetime":"2016-03-10T14:09:13","infoCode":"APPH2yNiKAxAASearchReport","insCode":"80000028","insName":"国联证券","insStar":"4","jlrs":["165070000","245570000","323140000","",""],"rate":"增持","secuFullCode":"002298.SZ","secuName":"中电鑫龙","sratingName":"推荐","sy":"0.1358","syls":["54.03","36.32","27.6","",""],"sys":["0.261","0.388","0.511","",""],"title":"年报点评：传统主业不振，公共安全等新业务空间广阔","profitYear":"2015","type":"1","newPrice":"16.05"},{"author":"徐春","change":"维持","companyCode":"10000506","datetime":"2016-03-10T14:10:41","infoCode":"APPH2yNiKAwLASearchReport","insCode":"10001081","insName":"长江证券","insStar":"4","jlrs":["526700000","664100000","","",""],"rate":"买入","secuFullCode":"600699.SH","secuName":"均胜电子","sratingName":"买入","sy":"0.6100","syls":["30","23","","",""],"sys":["1.01","1.32","","",""],"title":"收纳全球顶级企业，打造自动驾驶最强音","profitYear":"2015","type":"1","newPrice":"32.50"},{"author":"姜浩","change":"维持","companyCode":"80152117","datetime":"2016-03-10T14:15:48","infoCode":"APPH2yNiKAy4ASearchReport","insCode":"80000074","insName":"光大证券","insStar":"5","jlrs":["66470000","99130000","","",""],"rate":"持有","secuFullCode":"002615.SZ","secuName":"哈尔斯","sratingName":"增持","sy":"0.2000","syls":["82","55","","",""],"sys":["0.36","0.54","","",""],"title":"签订入园协议，进一步分享“迪斯尼”红利","profitYear":"2015","type":"1","newPrice":"17.82"},{"author":"刘舒畅,黄伟轩","change":"维持","companyCode":"10000695","datetime":"2016-03-10T14:31:04","infoCode":"APPH2yNiKB24ASearchReport","insCode":"10001081","insName":"长江证券","insStar":"4","jlrs":["1980500000","2360800000","2875500000","",""],"rate":"买入","secuFullCode":"000423.SZ","secuName":"东阿阿胶","sratingName":"买入","sy":"2.4847","syls":["15.67","13.15","10.79","",""],"sys":["3.03","3.61","4.4","",""],"title":"价值回归助力高增长","profitYear":"2015","type":"1","newPrice":"58.06"},{"author":"陈显帆,周尔双","change":"维持","companyCode":"80082000","datetime":"2016-03-10T14:33:06","infoCode":"APPH2yNiKB2NASearchReport","insCode":"80000031","insName":"东吴证券","insStar":"3","jlrs":["513000000","691000000","970000000","",""],"rate":"增持","secuFullCode":"300024.SZ","secuName":"机器人","sratingName":"增持","sy":"0.6000","syls":["69","51","36","",""],"sys":["0.72","0.97","1.37","",""],"title":"业绩低于预期，定增+并购助力16年高成长","profitYear":"2015","type":"1","newPrice":"24.14"},{"author":"黄守宏,邵琳琳","change":"首次","companyCode":"10001332","datetime":"2016-03-10T14:52:57","infoCode":"APPH2yNiKB4zASearchReport","insCode":"80084302","insName":"安信证券","insStar":"4","jlrs":["119200000","137700000","","",""],"rate":"买入","secuFullCode":"600452.SH","secuName":"涪陵电力","sratingName":"买入","sy":"1.1600","syls":["62.4","54.1","","",""],"sys":["0.53","0.61","","",""],"title":"优质资产望陆续注入，公司或成国网节能业务平台","profitYear":"2015","type":"1","newPrice":"37.59"},{"author":"郑春明","change":"维持","companyCode":"10000590","datetime":"2016-03-10T14:53:30","infoCode":"APPH2yNiKB59ASearchReport","insCode":"80000119","insName":"群益证券","insStar":"1","jlrs":["","","","",""],"rate":"增持","secuFullCode":"000001.SZ","secuName":"平安银行","sratingName":"买入","sy":"1.5600","syls":["6.2","5.94","","",""],"sys":["1.63","1.71","","",""],"title":"年报点评：收入强劲，拨备加大","profitYear":"2015","type":"1","newPrice":"9.40"},{"author":"黄付生","change":"维持","companyCode":"80064560","datetime":"2016-03-10T15:36:16","infoCode":"APPH2yNiKB9EASearchReport","insCode":"80066058","insName":"中信建投","insStar":"5","jlrs":["2987200000","3520130000","3954280000","",""],"rate":"增持","secuFullCode":"603288.SH","secuName":"海天味业","sratingName":"增持","sy":"0.9300","syls":["24.63","20.9","18.61","",""],"sys":["1.1","1.3","1.46","",""],"title":"酱油增速放缓，蚝油、酱类高增长，盈利能力创新高","profitYear":"2015","type":"1","newPrice":"31.11"},{"author":"马松","change":"维持","companyCode":"80143480","datetime":"2016-03-10T16:39:23","infoCode":"APPH2yNiKBTEASearchReport","insCode":"80000028","insName":"国联证券","insStar":"4","jlrs":["74030000","110380000","","",""],"rate":"增持","secuFullCode":"300084.SZ","secuName":"海默科技","sratingName":"推荐","sy":"0.0321","syls":["42.11","28.24","","",""],"sys":["0.228","0.34","","",""],"title":"“3G+1”：新型独立能源公司如虎添翼","profitYear":"2015","type":"1","newPrice":"12.72"},{"author":"马宝德","change":"首次","companyCode":"10000928","datetime":"2016-03-10T16:48:35","infoCode":"APPH2yNiKBVLASearchReport","insCode":"80000028","insName":"国联证券","insStar":"4","jlrs":["","","","",""],"rate":"增持","secuFullCode":"000591.SZ","secuName":"太阳能","sratingName":"推荐","sy":"0.6500","syls":["26.58","21.96","","",""],"sys":["0.57","0.69","","",""],"title":"涅槃重生，A股最大光伏电站运营平台","profitYear":"2015","type":"1","newPrice":"15.82"},{"author":"牧原","change":"","companyCode":"80082022","datetime":"2016-03-10T16:50:35","infoCode":"APPH2yNiKBVKASearchReport","insCode":"80000028","insName":"国联证券","insStar":"4","jlrs":["191900000","227300000","","",""],"rate":"增持","secuFullCode":"002308.SZ","secuName":"威创股份","sratingName":"推荐","sy":"0.1400","syls":["62","52","","",""],"sys":["0.23","0.27","","",""],"title":"事件点评：与南京康轩文教设立合资公司，发力教育内容","profitYear":"2015","type":"1","newPrice":"16.15"},{"author":"石晋","change":"维持","companyCode":"10000690","datetime":"2016-03-10T17:09:54","infoCode":"APPH2yNiKBetASearchReport","insCode":"80000080","insName":"山西证券","insStar":"2","jlrs":["1151300000","1426210000","1609080000","",""],"rate":"买入","secuFullCode":"000418.SZ","secuName":"小天鹅A","sratingName":"买入","sy":"1.4500","syls":["13.14","10.6","9.4","",""],"sys":["1.82","2.26","2.55","",""],"title":"受益T+3新型产销模式，公司净利超预期","profitYear":"2015","type":"1","newPrice":"34.95"},{"author":"马宝德","change":"维持","companyCode":"80173429","datetime":"2016-03-10T17:49:07","infoCode":"APPH2yNiKBtXASearchReport","insCode":"80000028","insName":"国联证券","insStar":"4","jlrs":["652410000","840550000","","",""],"rate":"增持","secuFullCode":"601222.SH","secuName":"林洋能源","sratingName":"推荐","sy":"1.2900","syls":["18.12","14.06","","",""],"sys":["1.61","2.07","","",""],"title":"临时公告点评：第一单增持已完成，彰显大股东强烈信心","profitYear":"2015","type":"1","newPrice":"38.18"},{"author":"王建伟,邹兰兰","change":"首次","companyCode":"80139608","datetime":"2016-03-10T17:49:36","infoCode":"APPH2yNiKBw7ASearchReport","insCode":"10001005","insName":"东北证券","insStar":"3","jlrs":["292000000","412000000","","",""],"rate":"买入","secuFullCode":"002421.SZ","secuName":"达实智能","sratingName":"买入","sy":"0.2679","syls":["32.83","23.3","","",""],"sys":["0.46","0.64","","",""],"title":"轨交和医疗业务绽放推动公司高成长","profitYear":"2015","type":"1","newPrice":"22.80"},{"author":"李强,陈鹏","change":"维持","companyCode":"80064560","datetime":"2016-03-10T19:11:03","infoCode":"APPH2yNiKCT5ASearchReport","insCode":"10001005","insName":"东北证券","insStar":"3","jlrs":["3035000000","3566000000","4197000000","",""],"rate":"增持","secuFullCode":"603288.SH","secuName":"海天味业","sratingName":"增持","sy":"0.9300","syls":["24","21","18","",""],"sys":["1.12","1.32","1.55","",""],"title":"四季度收入同比大幅度增长","profitYear":"2015","type":"1","newPrice":"31.11"},{"author":"瞿永忠,傅畅畅","change":"维持","companyCode":"80097596","datetime":"2016-03-10T19:15:11","infoCode":"APPH2yNiKCT6ASearchReport","insCode":"10001005","insName":"东北证券","insStar":"3","jlrs":["161000000","205000000","","",""],"rate":"买入","secuFullCode":"002296.SZ","secuName":"辉煌科技","sratingName":"买入","sy":"0.1989","syls":["37","29","","",""],"sys":["0.36","0.46","","",""],"title":"在信息化进程中完成铁路与WiFi资源的整合","profitYear":"2015","type":"1","newPrice":"17.86"},{"author":"张镭,雷雳,李辻","change":"维持","companyCode":"80161173","datetime":"2016-03-10T19:48:48","infoCode":"APPH2yNiKCdMASearchReport","insCode":"80066522","insName":"中投证券","insStar":"4","jlrs":["194000000","283000000","","",""],"rate":"买入","secuFullCode":"002609.SZ","secuName":"捷顺科技","sratingName":"强烈推荐","sy":"0.2500","syls":["41.02","28.2","","",""],"sys":["0.32","0.47","","",""],"title":"定增过会，16年是量变到质变的关键年","profitYear":"2015","type":"1","newPrice":"18.45"},{"author":"刘帅","change":"维持","companyCode":"10000039","datetime":"2016-03-10T19:52:24","infoCode":"APPH2yNiKCeGASearchReport","insCode":"80000119","insName":"群益证券","insStar":"1","jlrs":["4101000000","4763000000","","",""],"rate":"增持","secuFullCode":"600066.SH","secuName":"宇通客车","sratingName":"买入","sy":"1.6000","syls":["12","","","",""],"sys":["1.85","2.15","","",""],"title":"龙头地位稳固，新能源客车市场占有率有望提高","profitYear":"2015","type":"1","newPrice":"22.07"},{"author":"华巍","change":"","companyCode":"80194236","datetime":"2016-03-10T19:57:00","infoCode":"APPH2yNiKCe6ASearchReport","insCode":"80000119","insName":"群益证券","insStar":"1","jlrs":["344000000","437000000","","",""],"rate":"增持","secuFullCode":"002658.SZ","secuName":"雪迪龙","sratingName":"买入","sy":"0.4300","syls":["","28","","",""],"sys":["0.57","0.72","","",""],"title":"业绩增长符合预期，致力打造环境综合服务提供商","profitYear":"2015","type":"1","newPrice":"17.61"},{"author":"张镭,阮巧燕","change":"首次","companyCode":"80146933","datetime":"2016-03-10T20:01:02","infoCode":"APPH2yNiKCe5ASearchReport","insCode":"80066522","insName":"中投证券","insStar":"4","jlrs":["345000000","451000000","","",""],"rate":"买入","secuFullCode":"300100.SZ","secuName":"双林股份","sratingName":"强烈推荐","sy":"0.6200","syls":["30","23","","",""],"sys":["0.87","1.14","","",""],"title":"传统和EV动力总成双布局，外延增厚业绩","profitYear":"2015","type":"1","newPrice":"36.30"},{"author":"旷实","change":"","companyCode":"10001098","datetime":"2016-03-10T20:04:38","infoCode":"APPH2yNiKCdyASearchReport","insCode":"80000200","insName":"中银国际","insStar":"4","jlrs":["","","","",""],"rate":"买入","secuFullCode":"000802.SZ","secuName":"北京文化","sratingName":"买入","sy":"0.0546","syls":["","","","",""],"sys":["0.37","0.43","","",""],"title":"投资山东卫视真人秀《花漾梦工厂》，综艺布局持续推进","profitYear":"2015","type":"1","newPrice":"21.49"},{"author":"李南,钱玥,吴双","change":"维持","companyCode":"10000590","datetime":"2016-03-10T20:15:21","infoCode":"APPH2yNiKCddASearchReport","insCode":"80056613","insName":"高华证券","insStar":"4","jlrs":["23572600000","25680800000","28315100000","",""],"rate":"中性","secuFullCode":"000001.SZ","secuName":"平安银行","sratingName":"中性","sy":"1.5600","syls":["6.2","5.7","5.1","",""],"sys":["1.65","1.79","1.98","",""],"title":"业绩符合预期：较高的拨备抵消了净息差/拨备前营业利润的强劲表现","profitYear":"2015","type":"1","newPrice":"9.40"},{"author":"闫永正","change":"","companyCode":"10000695","datetime":"2016-03-10T20:16:53","infoCode":"APPH2yNiKCkeASearchReport","insCode":"80000119","insName":"群益证券","insStar":"1","jlrs":["1903000000","2311000000","","",""],"rate":"增持","secuFullCode":"000423.SZ","secuName":"东阿阿胶","sratingName":"买入","sy":"2.4847","syls":["19","","","",""],"sys":["2.91","3.53","","",""],"title":"2015年业绩增速稳健，符合预期","profitYear":"2015","type":"1","newPrice":"58.06"},{"author":"高观朋","change":"维持","companyCode":"80084628","datetime":"2016-03-10T20:24:32","infoCode":"APPH2yNiKCiyASearchReport","insCode":"80000119","insName":"群益证券","insStar":"1","jlrs":["420000000","497000000","","",""],"rate":"增持","secuFullCode":"002172.SZ","secuName":"澳洋科技","sratingName":"买入","sy":"0.1955","syls":["23","19","","",""],"sys":["0.6","0.72","","",""],"title":"Q1业绩预盈，行业供需格局向好，维持买入评级","profitYear":"2015","type":"1","newPrice":"11.40"},{"author":"郑连声","change":"维持","companyCode":"10001061","datetime":"2016-03-10T20:36:42","infoCode":"APPH2yNiKCpyASearchReport","insCode":"80000180","insName":"渤海证券","insStar":"2","jlrs":["29000000","36000000","51000000","",""],"rate":"增持","secuFullCode":"000757.SZ","secuName":"浩物股份","sratingName":"增持","sy":"0.0300","syls":["130.8","106.3","74.9","",""],"sys":["0.06","0.08","0.11","",""],"title":"年报点评：公司经营渐入正轨，资本运作看点不变","profitYear":"2015","type":"1","newPrice":"10.56"}],"pages":"327","update":"2016-09-09","count":"16339"}'
pos = text.find("=")
len = text.__len__()
text = text[pos+1:len]
j = json.loads(text, encoding='utf-8')

for entry in j["data"]:
    #cast full address
    infoCode = entry["infoCode"]
    strDate = entry["datetime"][0:4] + entry["datetime"][5:7] +  entry["datetime"][8:10]
    url = "http://data.eastmoney.com/report/" + strDate + "/" + infoCode + ".html"
    print(url)

httpClient = None
#httpClient = httplib.HTTPConnection('202.108.22.5:80', timeout=30)
#httpClient = httplib.HTTPConnection('www.baidu.com:80', timeout=30)
#httpClient.request('GET', '/')
httpClient = httplib.HTTPConnection('datainterface.eastmoney.com', timeout=30)
httpClient.request('GET', 'http://datainterface.eastmoney.com//EM_DataCenter/js.aspx?type=SR&sty=GGSR&js=var%20jSkOhjcD={%22data%22:[(x)],%22pages%22:%22(pc)%22,%22update%22:%22(ud)%22,%22count%22:%22(count)%22}&ps=25&p=7&code=000001&rt=49107120')

response = httpClient.getresponse()
body = response.read()
kkwood = 1